Repository navigation
Postgres 19: the update moves an archive to a new PostgreSQL major version - #77
Merged
Merged
Conversation
…e update Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Seb H. <[email protected]>
…refuses to start next to it Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Seb H. <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Seb H. <[email protected]>
…ctly Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Seb H. <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Seb H. <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PostgreSQL 19 refuses to start on a data directory written by another major version, so a plain image bump (Dependabot #73) breaks every existing archive. The update now handles a major change itself.
scripts/update.sh: detects a major change, stops the app, backs up and re-verifies the checksums, sets the old data aside in the volume (18/kept), starts a fresh PostgreSQL 19 and restores the dump (restore.sh --database-only). Nothing is deleted; the final message prints the removal command..update-in-progress): a re-run refuses and prints recovery steps;update.sh --recoverclears it.rmormv; the disk check counts the second database copy.compose.yamland the Testcontainers images move topostgres:19-alpine(compose pinned by digest).operations.md,deployment.md,development.md,security.md(row for the kept old database),CHANGELOG.md.Supersedes #73.
Tested
scripts/test-update.sh(v0.5.0 on PG18 to this code on PG19): data survives, failed-update rollback returns the original database, interrupt and recover case, removal command. Alsotest-update.sh 0.1andtest-backup-restore.sh.update-fromfor 0.2 to 0.5 (CI),/security-review. Not testable here: a real long-running archive, disk-full conditions.🤖 Generated with Claude Code